package com.huan.vertxle;

import com.huan.vertxle.enums.WareOperaTypeEnum;
import com.huan.vertxle.model.ScanCode;
import io.vertx.core.http.HttpClient;
import io.vertx.core.json.Json;
import org.junit.jupiter.api.Test;

import java.nio.charset.StandardCharsets;
import java.util.Arrays;

public class test1 {
  @Test
  void strL1() {
    String str = "2️⃣1️⃣3️⃣";
    String str1 = str.substring(2, 3);
    String str2 = str.substring(1, 2);
    String str3 = str2 + str1;
    System.out.println(4 + str3 + 1 + str3 + 0 + str3);
    System.out.println(Arrays.toString(str1.getBytes(StandardCharsets.UTF_8)));
    System.out.println(Arrays.toString(str2.getBytes(StandardCharsets.UTF_8)));
  }

  @Test
  void jsonDec() {
    ScanCode scanCode = Json.decodeValue("{\"code\":\"73156542596849\",\"weight\":\"0\",\"date\":\"2021-05-31 09:47:37\",\"workConsole\":\"1\"}", ScanCode.class);
    System.out.println(scanCode.toString());
    System.out.println(WareOperaTypeEnum.SCAN_STORAGE.name());
  }

  @Test
  void http() {
  }
}
